/*
 * @Author: wangming
 * @Date: 2020-09-09 19:22:01
 * @LastEditors: wangming
 * @LastEditTime: 2022-03-09 10:28:05
 * @Description: file content
 */
import tool from './tool.vue';
import xPagination from './xPagination.vue';
import elInputNumber from './element/InputNumber';
import TreeSelect from './TreeSelect';
import CommonUpload from './CommonUpload/index.vue';
import elInput from './el-input/index.jsx';
import monacoEditor from './monacoEditor/index';
import Fullscreen from './Fullscreen.vue';
import {
  Scrollbar,
  Pagination,
  Dialog,
  Autocomplete,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Menu,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  DatePicker,
  TimeSelect,
  TimePicker,
  Popover,
  Tooltip,
  Breadcrumb,
  BreadcrumbItem,
  Form,
  FormItem,
  Tabs,
  TabPane,
  Tag,
  Tree,
  Alert,
  Slider,
  Icon,
  Row,
  Col,
  Upload,
  Progress,
  Spinner,
  Badge,
  Card,
  Rate,
  Steps,
  Step,
  Carousel,
  CarouselItem,
  Collapse,
  CollapseItem,
  Cascader,
  ColorPicker,
  Transfer,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Timeline,
  TimelineItem,
  Link,
  Divider,
  Image,
  Calendar,
  Backtop,
  PageHeader,
  CascaderPanel,
  Loading,
  MessageBox,
  Message,
  Notification,
  Avatar,
  Popconfirm,
  Drawer,
  Input,
  Result,
  Skeleton,
  SkeletonItem
} from 'element-ui';
import {
  HmPermissionButton,
  HmPermissionLayout,
} from "@/components/HmPermission";

import '@/assets/sass/theme/element-override.scss'

Table.props.headerCellStyle = {
  type: Object,
  default: () => ({
    backgroundColor: '#F5F7FA',
    color: '#333',
    height: '44px',
    fontSize: '14px',
  }),
};
export default function install(Vue) {
  Vue.component(HmPermissionButton.name, HmPermissionButton);
  Vue.component(HmPermissionLayout.name, HmPermissionLayout);
  Vue.component('elInputNumber', elInputNumber);
  Vue.component('Fullscreen', Fullscreen);
  Vue.component('hlTool', tool);
  Vue.component('xPagination', xPagination);
  Vue.component('common-upload', CommonUpload);
  Vue.component('tree-select', TreeSelect);
  Vue.component('elInput', elInput);
  /** element ui */
  Vue.use(Pagination);
  Vue.use(Scrollbar);
  Vue.use(Avatar);
  Vue.use(Dialog);
  Vue.use(Autocomplete);
  Vue.use(Dropdown);
  Vue.use(DropdownMenu);
  Vue.use(DropdownItem);
  Vue.use(Menu);
  Vue.use(Submenu);
  Vue.use(MenuItem);
  Vue.use(MenuItemGroup);
  Vue.use(Radio);
  Vue.use(RadioGroup);
  Vue.use(RadioButton);
  Vue.use(Checkbox);
  Vue.use(CheckboxButton);
  Vue.use(CheckboxGroup);
  Vue.use(Switch);
  Vue.use(Select);
  Vue.use(Option);
  Vue.use(OptionGroup);
  Vue.use(Button);
  Vue.use(ButtonGroup);
  Vue.use(Table);
  Vue.use(TableColumn);
  Vue.use(DatePicker);
  Vue.use(TimeSelect);
  Vue.use(TimePicker);
  Vue.use(Popover);
  Vue.use(Tooltip);
  Vue.use(Breadcrumb);
  Vue.use(BreadcrumbItem);
  Vue.use(Form);
  Vue.use(FormItem);
  Vue.use(Tabs);
  Vue.use(TabPane);
  Vue.use(Tag);
  Vue.use(Tree);
  Vue.use(Alert);
  Vue.use(Slider);
  Vue.use(Icon);
  Vue.use(Row);
  Vue.use(Col);
  Vue.use(Upload);
  Vue.use(Progress);
  Vue.use(Spinner);
  Vue.use(Badge);
  Vue.use(Card);
  Vue.use(Rate);
  Vue.use(Steps);
  Vue.use(Step);
  Vue.use(Carousel);
  Vue.use(CarouselItem);
  Vue.use(Collapse);
  Vue.use(CollapseItem);
  Vue.use(Cascader);
  Vue.use(ColorPicker);
  Vue.use(Transfer);
  Vue.use(Container);
  Vue.use(Header);
  Vue.use(Aside);
  Vue.use(Main);
  Vue.use(Footer);
  Vue.use(Timeline);
  Vue.use(TimelineItem);
  Vue.use(Link);
  Vue.use(Divider);
  Vue.use(Image);
  Vue.use(Calendar);
  Vue.use(Backtop);
  Vue.use(PageHeader);
  Vue.use(CascaderPanel);
  Vue.use(Popconfirm);
  Vue.use(Drawer);
  Vue.use(Result);
  Vue.use(Skeleton);
  Vue.use(SkeletonItem);

  Vue.use(Loading.directive);
  Vue.prototype.$loading = Loading.service;
  Vue.prototype.$msgbox = MessageBox;
  Vue.prototype.$alert = MessageBox.alert;
  Vue.prototype.$confirm = MessageBox.confirm;
  Vue.prototype.$prompt = MessageBox.prompt;
  Vue.prototype.$notify = Notification;
  Vue.prototype.$message = Message;
  Vue.prototype.$ELEMENT = { size: 'small' };
  Vue.prototype.$monacoEditor = monacoEditor;
}
